<extend name="Public/layout"/>
<block name="style" >
    <link rel="stylesheet" type="text/css" href="__LYUI__/css/lyui.extend.min.css">
    <link rel="stylesheet" type="text/css" href="__ADMIN_CSS__/style.css">
</block>

<block name="main">
   <div id="main" class="col-xs-12 col-sm-9 main" style="overflow-y: scroll;">
        <!-- 面包屑导航 -->
        <ul class="breadcrumb">
            <li><i class="fa fa-map-marker"></i></li>
            <foreach name="_menu_tab['name']" item="tab_v" >
            <li class="text-muted">{$tab_v}</li>
            </foreach>
        </ul>

        <!-- 主体内容区域 -->
        <div class="tab-content ct-tab-content">
            <div class="panel-body">
                <div class="builder formbuilder-box">
                        
                        <div class="form-group"></div>

                        <!-- 顶部工具栏按钮 -->
                        <div class="builder-toolbar">
                            <div class="row">
                                <!-- 工具栏按钮 -->
                                    <div class="col-xs-12 col-sm-8 button-list clearfix">
                                        <div class="form-group">
                                            <a title="新增" class="btn btn-primary-outline btn-pill" href="{:U('Manage/add')}">新增</a>&nbsp;
                                            <a title="启用" target-form="ids" class="btn btn-success-outline btn-pill ajax-post confirm" model="Manage" href="{:U('Manage/setStatus',array('status'=>resume,'model'=>Manage))}">启用</a>&nbsp;
                                            <a title="禁用" target-form="ids" class="btn btn-warning-outline btn-pill ajax-post confirm" model="Manage" href="{:U('Manage/setStatus',array('status'=>forbid,'model'=>Manage))}">禁用</a>&nbsp;
                                            <a title="删除" target-form="ids" class="btn btn-danger-outline btn-pill ajax-post confirm" model="Manage" href="{:U('Manage/setStatus',array('status'=>delete,'model'=>Manage))}">删除</a>&nbsp;                   
                                        </div>
                                    </div>

                                <!-- 搜索框 -->
                                <div class="col-xs-12 col-sm-4 clearfix">
                                    <form class="form" method="get" action="">
                                        <div class="form-group">
                                            <div class="input-group search-form">
                                                <input type="text" name="keyword" class="search-input form-control" value="{$_GET.keyword}" placeholder="请输入ID/用户名／昵称">
                                                <span class="input-group-btn"><a class="btn btn-default search-btn"><i class="fa fa-search"></i></a></span>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 数据列表 -->
                        <div class="builder-container">
                            <div class="row">
                                <div class="col-xs-12">
                                    <div class="builder-table">
                                        <div class="panel panel-default table-responsive">
                                            <table class="table table-bordered table-striped table-hover">
                                              <thead>
                                                <tr>
                                                    <th>
                                                        <input class="check-all" type="checkbox">
                                                    </th>
                                                    <th>UID</th>
                                                    <th>昵称</th>
                                                    <th>用户名</th>
                                                    <th>角色</th>
                                                    <th>注册时间</th>
                                                    <th>状态</th>
                                                    <th>操作</th>
                                                </tr>
                                            </thead>
                                                <tbody>
                                                    <volist name="list" id="data">
                                                        <tr>
                                                            <td>
                                                                <input class="ids" type="checkbox" value="{$data['id']}" name="ids[]">
                                                            </td>
                                                            <td>{$data['id']}</td>
                                                            <td>{$data['nickname']}</td>
                                                            <td>{$data['username']}</td>
                                                            <td>{$data['title']}</td>
                                                            <td>{$data['create_time']|date='Y-m-d',###}</td>
                                                            <td>
                                                               <eq name="data['status']" value="1" >
                                                                    <i class="fa fa-check text-success"></i>
                                                               <else />
                                                                    <i class="fa fa-ban text-danger"></i>
                                                               </eq>
                                                            </td>
                                                            <td>
                                                                 <a name="edit" title="编辑" class="label label-primary-outline label-pill" href="{:U('Manage/edit',array('id'=>$data['id']))}">编辑</a>
                                                                <neq name="data['id']" value="1" >
                                                                <eq name="data['status']" value="1" >
                                                                <a name="forbid" title="禁用" class="label label-warning-outline label-pill ajax-get confirm" href="{:U('Manage/setStatus',array('status'=>forbid,'ids'=>$data['id'],'model'=>'Manage'))}">禁用</a>
                                                                <else />
                                                                <a name="forbid" title="启用" class="label label-success-outline label-pill ajax-get confirm" href="{:U('Manage/setStatus',array('status'=>resume,'ids'=>$data['id'],'model'=>'Manage'))}">启用</a>
                                                                </eq>

                                                                <a name="delete" title="删除" class="label label-danger-outline label-pill ajax-get confirm" model="Manage" href="{:U('Manage/setStatus',array('status'=>delete,'ids'=>$data['id'],'model'=>'Manage'))}">删除</a>
                                                                </neq>
                                                        </tr>
                                                    </volist>

                                                    <empty name="list">
                                                        <tr class="builder-data-empty">
                                                            <td class="text-center empty-info" colspan="20">
                                                                <i class="fa fa-database"></i> 暂时没有数据<br>
                                                            </td>
                                                        </tr>
                                                    </empty>
                                                </tbody>
                                            </table>
                                        </div>

                                        <notempty name="table_data_page">
                                            <ul class="pagination">{$table_data_page}</ul>
                                        </notempty>
                                    </div>
                                </div>
                            </div>
                        </div>

                </div>
            </div>
    </div>                   
</div>
</block>

<block name="script">
    <script type="text/javascript" src="__LYUI__/js/lyui.extend.min.js"></script>
</block>